export default function(type="get",url,param = {}){
	let p = url.split('/');
	let contoller = 'index';
	let action = 'index';
	if(p.length==2){
		contoller = p[0];
		action = p[1];
	}
	if(!param.lan) param.lan = uni.getStorageSync('lan')
	param.token = uni.getStorageSync('token')
	
	return new Promise((success,fail) => {
		let lib = require('./../modules/' + contoller);
		let data = lib[action](param);
		console.warn(`${type}::api/${contoller}/${action}`,param)
		setTimeout(function(){
			console.log(data)
			success(data);
		},1000);
		
	})
}